<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tag" uri="surveyonline-taglib" %> 
<%@page import="fr.univ.surveyonline.model.Survey"%>
<%@page import="fr.univ.surveyonline.question.xmlbuilder.PropertiesToXml"%>
<%
	Survey survey = (Survey) request.getAttribute("survey");
	if ((survey == null)) {
		throw new IllegalStateException("est null");
	}
	
	String properties = PropertiesToXml.propertiesToXML(survey);
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
    <title><tag:languageTag id="title"/></title>
	<%@ include file="/layout/head.tag" %>
	<link rel="stylesheet" type="text/css" media="screen" href="/css/style-create-survey.css" />
	<script type="text/javascript" src="/js/utils/encoder.js"></script>
	<script type="text/javascript" src="/js/create-survey/xml-tree-loader.js"></script>
	<script type="text/javascript" src="/js/create-survey/xml-data-helper.js"></script>
	<script type="text/javascript" src="/js/create-survey/gui-survey-tree.js"></script>
	<script type="text/javascript" src="/js/create-survey/gui-survey-treepanel.js"></script>
	<script type="text/javascript" src="/js/create-survey/gui-survey-properties.js"></script>
	<script type="text/javascript" src="/js/create-survey/gui-add-question.js"></script>
	<script type="text/javascript" src="/js/create-survey/gui-add-constraints.js"></script>
	<script type="text/javascript" src="/js/create-survey/gui-survey-questions.js"></script>
	<script type="text/javascript" src="/js/create-survey/main.js"></script>
</head>
<body>

<div id="global">
	<div id="entete">
		<%@ include file="/layout/menu.tag" %>
	</div>
	<div id="contenu">
		<h2><tag:languageTag id="quest_creation"/></h2>
		<p>
			<tag:languageTag id="quest_p1"/>
		</p>
		<h3><tag:languageTag id="quest_proprietes"/></h3>
		<div id="gui-ext-survey-properties"></div>
		<h3><tag:languageTag id="quest_questionnaire"/></h3>
		<div id="gui-ext-question"></div>
		<h3><tag:languageTag id="quest_previ"/></h3>
		<div id="gui-ext-question-preview"></div>
		<div id="gui-ext-xml-preview"></div>
		<div id="xml-preview"></div>
		<div id="gui-ext-survey-save"></div>
		<div id="survey-proprieties" style="display:none;"><%= properties %></div>
		<div id="xml-generated" style="display:none;"><%=survey.getXml()%></div>
	</div>
	<div id="pied">
		<%@ include file="/layout/pied.tag" %>
	</div>
</div>

</body>
</html>